package com.watchpoints.hook1;

import android.annotation.SuppressLint;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {



    @Override
    //activity初始化的时候调用的
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        //,Android O已弃用getDeviceId().
        TelephonyManager telephonyManager = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
        @SuppressLint("MissingPermission") String imei = telephonyManager.getDeviceId();

        TextView  tv_imei = (TextView) findViewById(R.id.tv_imei);
        TextView tv_passwordKey = (TextView) findViewById(R.id.tv_password);
        tv_imei.append(imei);

        String uin = "91120166";
        String temp= imei.concat(uin);


        String str = WeixinMD5.n((temp).getBytes()).substring(0,7);


        tv_passwordKey.append(str);

    }

}
